#include <unordered_map>
#include <vector>
using namespace std;
class Solution
{
public:
    bool isAnagram(string s, string t)
    {
        if (s.size() != t.size())
            return false;
        if (s == t)
            return false;
        unordered_map<char, int> count_map_1, count_map_2;
        for (int i = 0; i < s.size(); i++)
        {
            ++count_map_1[s[i]];
            ++count_map_2[t[i]];
        }
        if (count_map_1 != count_map_2)
            return false;
        return true;
    }
};
#include <vector>
using namespace std;
class Solution
{
public:
    bool isAnagram(string s, string t)
    {
        if (s.size() != t.size())
            return false;
        if (s == t)
            return false;
        vector<int> vt1(26, 0), vt2(26, 0);
        for (int i = 0; i < s.size(); i++)
        {
            vt1[s[i] - 'a']++;
            vt2[t[i] - 'a']++;
        }
        return vt1 == vt2;
    }
};
